#!/usr/bin/env python3

import os

def main():
    print("uid = %d, gid = %d, euid = %d, egid = %d" % (os.getuid(),
                os.getgid(), os.geteuid(), os.getegid()))
    print(os.getcwd())
    os.chdir("/")
    print("chdir: ", os.getcwd())
    os.environ['KYO'] = 'hello'
    print(os.environ['HOME'])
    #  os.setuid(1003)
    #  os.seteuid(1003)
    #  os.setgid(1003)
    print("uid = %d, gid = %d, euid = %d, egid = %d" % (os.getuid(),
                os.getgid(), os.geteuid(), os.getegid()))
    #  os.execl('/bin/ls', '-l', '--color=auto', '/kyo', '-l')
    #  os.execlp('ls', '-l', '--color=auto', '/kyo', '-l')
    #  os.execv('/bin/ls', ('-l', '--color=auto', '/kyo', '-l'))
    os.execlp('/kyo/python/4_pygame/4_ball.py', 'ball')

if __name__ == "__main__":
    main()
